<%@ Page Language="C#" MasterPageFile="~/AdminCP/AdminCP.master" AutoEventWireup="true"
    CodeFile="Members.aspx.cs" Inherits="AdminCP_Members" Title="Untitled Page" %>

<%@ Register Src="../include/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<asp:Content ID="ContentTitleMembers" ContentPlaceHolderID="CphTitle" runat="Server">
    <%=Resources.Lang.Members %>
</asp:Content>
<asp:Content ID="ContentScriptMembers" ContentPlaceHolderID="CphScriptCss" runat="Server">
</asp:Content>
<asp:Content ID="ContentBodyMembers" ContentPlaceHolderID="CphBody" runat="Server">
    <div id="middle">
        <div id="left-column">                    
                <%=Resources.Lang.Email %> :<asp:TextBox ID="txtSEmail" runat="server" Width="142px" Height="14px"></asp:TextBox>                    
                <%=Resources.Lang.Sex %> :
                <br />
                <asp:RadioButtonList CssClass="regular" ID="rblSex" runat="server" RepeatDirection="Horizontal"
                    RepeatLayout="Flow">
                    <asp:ListItem Selected="True" Text="Both"></asp:ListItem>
                    
                    <asp:ListItem Text="Male"></asp:ListItem>
                    
                    <asp:ListItem Text="Female"></asp:ListItem>
                </asp:RadioButtonList>
                <br />
                <%=Resources.Lang.FirstName %> :<asp:TextBox ID="txtSFName" runat="server" Width="142px" Height="14px"></asp:TextBox>                                
                <%=Resources.Lang.LastName %> :<asp:TextBox ID="txtSLName" runat="server" Width="142px" Height="14px"></asp:TextBox>                                
                <%=Resources.Lang.DateOfBirth %>:<asp:TextBox ID="txtSBirthdate" runat="server" Width="142px" Height="14px"></asp:TextBox>                                
                <%=Resources.Lang.Address %> :<asp:TextBox ID="txtSAddress" runat="server" Width="142px" Height="14px"></asp:TextBox>                                
                <%=Resources.Lang.Phone %> :<asp:TextBox ID="txtSPhone" runat="server" Width="142px" Height="14px"></asp:TextBox>                                
                <%=Resources.Lang.SecretQuestion %>:&nbsp;&nbsp;<asp:DropDownList ID="drpSQuestions" runat="server" Width="142px" ></asp:DropDownList>                
                <%=Resources.Lang.Role %>:&nbsp;&nbsp;<asp:DropDownList ID="drpSRoles" runat="server" Width="142px" ></asp:DropDownList>        
                <br />         <br />           
            <div align="center"> 
                <asp:Button ID="btsearch" runat="server" OnClick="btsearch_Click" Height="34px" Width="65px" /></div>
        </div>
        <div id="center-column">
            <div class="top-bar">
                <% if (Session["Membership"] != null && (Session["Membership"] as Web.Core.Objects.Member).IsAdministrator())
                       Response.Write("<a class=\"button\" href=\"Members.aspx?do=add\">" + Resources.Lang.Add + "</a>"); %>
                <h1>
                    <%=Resources.Lang.admincpProducts %>
                </h1>
            </div>
            <br />
            <br />
            <br />
            <div class="table">
                <img src="AdminImages/bg-th-left.gif" width="8" height="7" alt="" class="left" />
                <img src="AdminImages/bg-th-right.gif" width="7" height="7" alt="" class="right" />
                <table class="listing" cellpadding="0" cellspacing="0">
                    <tr>
                        <th class="first">
                            ID</th>
                        <th>
                            <%=Resources.Lang.Email %>
                        </th>
                        <th>
                            <%=Resources.Lang.FirstName %>
                        </th>
                        <th>
                            <%=Resources.Lang.LastName %>
                        </th>
                        <th>
                            <%=Resources.Lang.Role %>
                        </th>
                        <th>
                            <%=Resources.Lang.MemberDateAdded %>
                        </th>
                        <th>
                            <%=Resources.Lang.MemberLastLogin %>
                        </th>
                        <th class="last">
                            <%=Resources.Lang.Action %>
                        </th>
                    </tr>
                    <asp:Repeater ID="rptMembers" runat="server">
                        <ItemTemplate>
                            <tr>
                                <td class="first" width="7%">
                                    <%#DataBinder.Eval(Container.DataItem,"ID")%>
                                </td>
                                <td width="20%">
                                    <%#DataBinder.Eval(Container.DataItem,"Email")%>
                                </td>
                                <td width="20%">
                                    <%#DataBinder.Eval(Container.DataItem,"FirstName")%>
                                </td>
                                <td width="10%">
                                    <%#DataBinder.Eval(Container.DataItem,"LastName")%>
                                </td>
                                <td width="23%">
                                    <%#(DataBinder.Eval(Container.DataItem,"Role") as Web.Core.Objects.Role).Name%>
                                </td>
                                <td width="5%">
                                    <%#DataBinder.Eval(Container.DataItem,"DateAdded")%>
                                </td>
                                <td width="5%">
                                    <%#DataBinder.Eval(Container.DataItem,"LastLogin")%>
                                </td>
                                <td class="last" width="10%">
                                    <a href="Members.aspx?do=edit&mid=<%#DataBinder.Eval(Container.DataItem,"ID")%>">
                                        <img src="AdminImages/edit-icon.gif" /></a>&nbsp;<asp:Panel ID="pnlDel" runat="server">
                                        <a href="Members.aspx?do=del&mid=<%#DataBinder.Eval(Container.DataItem,"ID")%>">
                                            <img src="AdminImages/hr.gif" /></a></asp:Panel>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <AlternatingItemTemplate>
                            <tr class="bg">
                                <td class="first" width="7%">
                                    <%#DataBinder.Eval(Container.DataItem,"ID")%>
                                </td>
                                <td width="20%">
                                    <%#DataBinder.Eval(Container.DataItem,"Email")%>
                                </td>
                                <td width="20%">
                                    <%#DataBinder.Eval(Container.DataItem,"FirstName")%>
                                </td>
                                <td width="10%">
                                    <%#DataBinder.Eval(Container.DataItem,"LastName")%>
                                </td>
                                <td width="23%">
                                    <%#(DataBinder.Eval(Container.DataItem,"Role") as Web.Core.Objects.Role).Name%>
                                </td>
                                <td width="5%">
                                    <%#DataBinder.Eval(Container.DataItem,"DateAdded")%>
                                </td>
                                <td width="5%">
                                    <%#DataBinder.Eval(Container.DataItem,"LastLogin")%>
                                </td>
                                <td class="last" width="10%">
                                    <a href="Members.aspx?do=edit&mid=<%#DataBinder.Eval(Container.DataItem,"ID")%>">
                                        <img src="AdminImages/edit-icon.gif" /></a>&nbsp;<asp:Panel ID="pnlDel" runat="server">
                                        <a href="Members.aspx?do=del&mid=<%#DataBinder.Eval(Container.DataItem,"ID")%>">
                                            <img src="AdminImages/hr.gif" /></a></asp:Panel>
                                </td>
                            </tr>
                        </AlternatingItemTemplate>
                    </asp:Repeater>
                </table>
                <div class="select">
                    <uc1:Pager ID="Pager1" runat="server" />
                </div>
            </div>
            <br />
            <br />
            <asp:PlaceHolder ID="PlaceHolderBottom" runat="server"></asp:PlaceHolder>
        </div>
        <div id="right-column">
            <strong class="h">
                <%=Resources.Lang.admincpInfo %>
            </strong>
            <div class="box">
                <%=Resources.Lang.admincpMembersInfo %>
            </div>
        </div>
    </div>
</asp:Content>
